import request from "@/utils/request";

//微信登录
export function wexin_login_api(code) {
  return request.post({
    url: "/api/login/mpWeixinLogin",
    data: {
      code,
    },
  },{
    isTransformResponse:false
  });
}

//通过code获取手机号
export function mpWeixinGetPhone_api(code) {
  return request.post({
    url: "/api/login/mpWeixinGetPhone",
    data: {
      code,
    },
  });
}

//微信注册登录
export function mpWeixinRegisterAndLogin_api(data) {
  return request.post({
    url: "/api/login/mpWeixinRegisterAndLogin",
    data,
  });
}

//设置用户信息
export function profile_api(data) {
  return request.post({
    url: "/api/user/profile",
    data,
  });
}

//已登录用户获取手机号
export function mpWeixinDecodePhone_api(data) {
  return request.post({
    url: "/api/user/mpWeixinDecodePhone",
    data,
  });
}

//获取帮助
export function helps_api() {
  return request.get({
    url: "/api/mp/helps",
  });
}


//获取特惠包机询价单
export function getMyCharters_api() {
  return request.get({
    url: "/api/user/getMyCharters",
  });
}

//提交合作咨询
export function saveCoop_api(data) {
  return request.post({
    url: "/api/user/saveCoop",
    data,
  });
}

//提交反馈
export function saveFeedback_api(data) {
  return request.post({
    url: "/api/user/saveFeedback",
    data,
  });
}